<template>
  <div class="hello">
    <!-- 头部 -->
    <div class="head">
       <h2 style="textAlign: center">袁佳艺 2018213562</h2>
      <el-button style="backfgroundColor: red;position: absolute;right: 20px;top: 0px;" type="primary">
      <router-link to="/" v-if="!loginFlag2" >登录</router-link>
        </el-button>
    </div>

    <!-- 左侧菜单  -->
    <div class="leftMenu">
      <ul>
        <li
          v-loading.fullscreen.lock="fullscreenLoading"
          @click="openFullScreen1"
        >
          <router-link to="/search">地名搜索</router-link>
        </li>
        <li
          v-loading.fullscreen.lock="fullscreenLoading"
          @click="openFullScreen1"
        >
          <router-link to="/rout">路线规划</router-link>
        </li>
        <li
          v-loading.fullscreen.lock="fullscreenLoading"
          @click="openFullScreen1"
        >
          <router-link to="/park">搜索停车场</router-link>
        </li>
  
        <li><a href="http://localhost:3000/product">后台</a></li>

        <li
          v-loading.fullscreen.lock="fullscreenLoading"
          @click="openFullScreen1"
        >
          <router-link to="/num">数据统计</router-link>
        </li>

        <li
          v-loading.fullscreen.lock="fullscreenLoading"
          @click="openFullScreen1"
        >
          <router-link to="/user">服务</router-link>
        </li>
      </ul>
    </div>

    <!-- 地图显示区域 -->
    <div class="show">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: "mainForm",
  data() {
    return {
      fullscreenLoading: false,
      loginFlag2: false,
    };
  },
  methods: {
    
    // 跳转加载
    openFullScreen1() {
      this.fullscreenLoading = true;
      
      setTimeout(() => {
        this.fullscreenLoading = false;
      }, 400);
    },
    
  },

  
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.hello {
  width: 100%;
  height: 100%;
}

.head {
  width: 100%;
  height: 40px;
  background: rgb(253, 253, 255);
  position: fixed;
  z-index: 20;
}

.leftMenu {
  position: absolute;
  top: 35px;
  left: 0px;
  width: 200px;
  height: 100%;
  border-right: 2px solid black;
  /* background: brown; */
  background: #409EFF;
  box-sizing: border-box;
  position: fixed;
  z-index: 20;
}

.show {
  position: absolute;
  top: 35px;
  right: 0px;
  width: calc(100% - 200px);
  height: calc(100% - 40px);
  z-index: 10;
}

.leftMenu ul {
  height: 100%;
  width: 100%;
  position: relative;
}

.leftMenu ul li {
  width: 100%;
  height: 40px;
  text-align: center;
  border: 1px solid black;
  line-height: 40px;
  margin: 40px 0;
  cursor: pointer;
  transition: 0.5s all;
}

.leftMenu ul li:hover {
  background: rgb(225, 226, 225);
}
a {
  text-decoration: none;
  color: white;
}
</style>
